package com.alan.validate.constraints.Impl;

import com.alan.validate.constraints.NotEmpty;
import com.alan.validate.utils.ParamValidate;

public class NotEmptyValidate implements ParamValidate<NotEmpty,String> {

	public void initialize(NotEmpty constraintAnnotation){
		constraintAnnotation.message();
	}
	
	public boolean isValid(String value) {
		if ( value == null ) {
			return false;
		}
		return value.trim().length() > 0;
	}

}
